package com.project.web.system.service.impl.app;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.project.web.system.mapper.app.StdCodeMapper;
import com.project.web.system.mapper.app.StdCodeTypeMapper;
import com.project.web.system.model.app.StdCodeType;
import com.project.web.system.service.app.StdCodeTypeService;
import com.project.web.system.service.impl.common.BaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName StdCodeTypeServiceImpl
 * @Description
 * @Author 王天豪
 * @Date 2020/8/21 4:39 PM
 * @Version 1.0
 */
@Service("stdCodeTypeServiceImpl")
public class StdCodeTypeServiceImpl extends BaseServiceImpl<StdCodeType,Long> implements StdCodeTypeService {

    @Autowired
    private StdCodeTypeMapper stdCodeTypeMapper;

    @Autowired
    private StdCodeMapper stdCodeMapper;

    @Override
    public PageInfo<StdCodeType> selectList(StdCodeType stdCodeType, Page page) {
        PageHelper.startPage(page.getPageNum(),page.getPageSize());
        List<StdCodeType> stdCodeTypes = stdCodeTypeMapper.selectListPageInfo(stdCodeType);
        PageInfo pageInfo = new PageInfo(stdCodeTypes);
        return pageInfo;
    }
}
